﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TA.DotNetUtils;
using TA.Turbo.Controls;

namespace TA.Turbo.Design
{
	/// <summary>
	/// Provides a list of IDs of controls which are either a <see cref="TControl"/> or implement <see cref="IValueControlContainer"/>.
	/// </summary>
	public class TurboControlIdLister : BaseControlIdLister
	{
		/// <summary>
		/// Determines and returns a flag which indicates whether the specified control should be included in the result.
		/// </summary>
		/// <param name="c"></param>
		/// <returns></returns>
		protected override bool ControlMatches(System.Web.UI.Control c)
		{
			return c is TControl || c is IValueControlContainer;
		}
	}
}
